export interface User {
  id: number
  username: string
  email?: string
  phone?: string
  nickname?: string
  avatar?: string
  role: 'admin' | 'user' | 'guest'
  created_at: string
  updated_at: string
}

export interface FamilyMember {
  id: number
  user_id?: number
  name: string
  gender: 'male' | 'female'
  birth_date?: string
  death_date?: string
  is_alive: boolean
  avatar?: string
  bio?: string
  parent_id?: number
  spouse_id?: number
  generation: number
  created_at: string
  updated_at: string
}

export interface FamilyTree {
  id: number
  name: string
  description?: string
  root_member_id: number
  created_by: number
  created_at: string
  updated_at: string
}

export interface Honor {
  id: number
  title: string
  description?: string
  member_id: number
  honor_type: 'achievement' | 'award' | 'recognition'
  date_received?: string
  image_url?: string
  created_at: string
}

export interface ClanTemplate {
  id: number
  title: string
  content: string
  template_type: 'activity' | 'rule' | 'meeting' | 'venue'
  created_by: number
  created_at: string
  updated_at: string
}

export interface Comment {
  id: number
  content: string
  template_id: number
  user_id: number
  parent_id?: number
  level: number
  created_at: string
  updated_at: string
}

export interface AIConversation {
  id: number
  user_id: number
  session_id: string
  message: string
  response: string
  model_used?: string
  scenario?: string
  role_simulated?: string
  created_at: string
}

export interface LoginRequest {
  username: string
  password: string
}

export interface RegisterRequest {
  username: string
  password: string
  email?: string
  phone?: string
  nickname?: string
}

export interface ApiResponse<T = any> {
  success: boolean
  data?: T
  message?: string
  error?: string
}